<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" autoFlush="false"  buffer="1028kb"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<script charset="utf-8" src="${ctx}/resource/plugins/kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="${ctx}/resource/plugins/kindeditor/lang/zh-CN.js"></script>
<style type="text/css">
	.SubMitBtn button{width: 20%}
	.SelBK:hover div{display: block;}
	.SelBK p{border: 1px solid white;}
</style>

<div class="_P10">
	<div class="title" ><label style="border-left: 5px solid #428BD1;" class="_PL10 _LH20 _FS15 _M5 bold">发表新帖子~</label></div>
	<div class=" clear">
		<span class="g-18-24"><input value="" placeholder="帖子标题"  class="_PT10 _PB10 "/></span>
		<span class="g-6-24 SelBK" style="position: relative;"><input name="bbsType" placeholder="==选择版块=="  class="_PT10 _PB10 TAC" readonly="readonly"/>
			<div style="position: absolute;width: 100%;margin-top: -1px;" class="_white _panel hide">
				<c:forEach var="list" items="${bbsType}" varStatus="status">
			 		<p class="_row cur TAC" onclick="setBK(this,'${list.name}','${list.id}')">${list.name} </p>
			 	</c:forEach>
			</div>
		</span>
	</div>
	<div class="title _MT5" ><label style="border-left: 5px solid #40AA53;" class="_PL10 _LH20 _FS15 _M5 bold">关键字</label></div>
	<div class=" clear">
		<span class="g-24-24"><input value="" placeholder="为你的帖子设置关键字，用逗号隔开，最多5个哦"  class="_PT10 _PB10 "/></span> 
	</div>
	<div class="FaTie _MT10" >
		<textarea id="editor_id" name="content" style="width:100%;height:350px;">
			html内容
		</textarea>
	</div>
	<div class="SubMitBtn TAC _MT10">
		<button class="_blue ">提交</button>
		<button class="_blue ">保存草稿</button>
	</div>
</div>



<script type="text/javascript">
	var editor = KindEditor.create('#editor_id', {
		resizeType : 1,
		allowPreviewEmoticons : false,
		allowImageUpload : false,
		items : [
		'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
		'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
		'insertunorderedlist', '|', 'emoticons', 'image', 'link']
	});
	
	function setBK(obj,name,key){
		$(obj).parent().parent().find("input[name='bbsType']").val(name);
	}
	
</script>